﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RN.ERP.Web
{
    public static class Extension
    {
        /// <summary>
        /// 比较两个string集合是否具有相同的元素。
        /// </summary>
        /// <param name="stringCollections1"></param>
        /// <param name="stringCollections2"></param>
        /// <returns></returns>
        public static bool Contains(this List<string> stringCollections1, List<string> stringCollections2)
        {
            bool result = false;
            foreach (string str in stringCollections1)
            {
                if (stringCollections2.Contains(str))
                {
                    result = true;
                    break;
                }
            }
            return result;
        }
    }
}